<template>
  <div>
    <el-card :body-style="{ padding: '20px' }">
      <div class="homecard">
        <div>
          <el-image
            :src="userStore.avatar"
            style="width: 150px; height: 150px; border-radius: 50%"
          ></el-image>
        </div>
        <div class="card-right">
          <h2>HI,{{ timeTip() }}!{{ userStore.username }}</h2>
          <h3>{{ title.title }}</h3>
        </div>
      </div>
    </el-card>
    <div style="text-align: center; margin-top: 20px">
      <Svgicon width="100%" height="300px" name="welcome" />
    </div>
  </div>
</template>

<script lang="ts" setup name="index">
import useUserStore from '@/store/module/user'
import { timeTip } from '@/utils/timeTip'
import title from '@/setting'
let userStore = useUserStore()
</script>
<style scoped lang="scss">
.homecard {
  display: flex;
  .card-right {
    display: flex;
    flex-direction: column;
    margin-left: 5%;
    h2 {
      font-size: 30px;
      font-weight: bold;
    }
    h2,
    h3 {
      display: flex;
      height: 50%;
      align-items: center;
      justify-content: center;
    }
    h3 {
      font-size: 20px;
      font-style: italic;
      color: #c0c0c0;
      font-weight: bold;
    }
  }
}
</style>
